/*******************************************************************************
 * Copyright (c) 2002 Boris Pruessmann and others. All rights reserved. This
 * program and the accompanying materials are made available under the terms of
 * the Common Public License v0.5 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/cpl-v05.html
 *
 * Contributors: Boris Pruessmann - Initial implementation.
 ******************************************************************************/
package net.sourceforge.perforce.core;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.team.FileModificationValidationContext;
import org.eclipse.core.runtime.IStatus;

/**
 * @version $Revision: 493 $
 * @author <a href="mailto:bpruessmann@users.sourceforge.net">Boris
 *         Pruessmann</a>
 */
public interface IOpenValidator {
  //----------------------------------------------------------------------------
  // --------- Methods

  /**
   * This one is called from our implementation of the
   * IFileModificationValidator
   *
   * @param files array of files that are going to be edited.
   * @param context contains the Shell or null.
   * @return status indicating whether the operation was successful and we can
   *         continue or not.
   */
  IStatus validateEdit(IFile[] files, FileModificationValidationContext context);
}
